home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / tcprogud.sit / TC Prog Guide / card_55372.txt < prev    next >
Text File  |  1991-02-27  |  1KB  |  25 lines

  1. -- card: 55372 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 4755
  5. -- name: 
  6.  
  7.  
  8. -- part contents for background part 4
  9. ----- text -----
  10. source code between the #ifdef and the #else (if present) is compiled.  Otherwise the source code between #else and #endif is compiled.  The programmer places source code appropriate to only one circumstance following the #ifdef and code for the other circumstance following the #else.  Thus, with only a single change ΓÇö incorporation of the appropriate #define directive ΓÇö source code appropriate to the chosen circumstance may be compiled.
  11.  
  12. For example, it may be desired that a program compile under two slightly different C compilers, having different names for the header file for standard string functions:
  13.  
  14.     # define    CCOMP1       /* remove this line for alternate compiler */
  15.               .
  16.               .
  17.     # ifdef       CCOMP1
  18.     # include  <string.h>
  19.     # else
  20.     # include  <strings.h>
  21.     # endif
  22.  
  23. -- part contents for background part 7
  24. ----- text -----
  25. 181